package com.wisdudu.blank.data.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

import io.realm.RealmObject;
import io.realm.annotations.Ignore;
import io.realm.annotations.PrimaryKey;

/**
 * Created by ypp on 2016/8/16.
 */
public class UserInfo extends RealmObject implements Parcelable {
    /**
     * uid : 49
     * nickname : 火脚肠
     * username : 18983604510
     * qq :
     * sex : 2
     * age : 26
     * faces : http://wisdudu.oss-cn-shenzhen.aliyuncs.com/cw_o_1.jpg
     * snsid : 157
     * btcid : 108
     * otoid : 0
     * wuyeid : qing01
     * wuyeurl : http://wy.wisdudu.com:9000
     * centerurl : http://sz.wisdudu.com/api
     * resturl : http://sz.wisdudu.com/api
     * socketurl : http://sz.wisdudu.com:1018
     * village : 房慧·智慧城
     * villageid : 3
     * city : 渝北区
     * autograph : 懒人，快来写签名！
     * houseNumber :
     * background : http://wisdudu.oss-cn-shenzhen.aliyuncs.com/fj_o_1.jpg
     * villagelist : [{"logid":"52","ssoid":"49","villageid":"3","wuyeid":"qing01","snsid":"157","btcid":"108","otoid":"0","roleid":"0","village":"房慧·智慧城"}]
     * visible : 1
     */
    @PrimaryKey
    private String uid;
    private String nickname;
    private String username;
    @Ignore
    private String qq;
    private int sex;
    private int age;
    private String faces;
    private String snsid;
    @Ignore
    private String btcid;
    @Ignore
    private String otoid;
    @Ignore
    private String wuyeid;
    @Ignore
    private String wuyeurl;
    private String centerurl;
    private String resturl;
    private String socketurl;
    private String village;
    private String villageid;
    private String city;
    private String autograph;
    private String houseNumber;
    private String background;
    private String birthday;
    private String houseid;
    private String housename;
    @Ignore
    private int visible;
    private String voiceprint;
    /**
     * logid : 52
     * ssoid : 49
     * villageid : 3
     * wuyeid : qing01
     * snsid : 157
     * btcid : 108
     * otoid : 0
     * roleid : 0
     * village : 房慧·智慧城
     */
    @Ignore
    private List<VillagelistEntity> villagelist;

    public String getVoiceprint() {
        return voiceprint;
    }

    public String getHouseid() {
        return houseid;
    }

    public void setHouseid(String houseid) {
        this.houseid = houseid;
    }

    public String getHousename() {
        return housename;
    }

    public void setHousename(String housename) {
        this.housename = housename;
    }

    public void setVoiceprint(String voiceprint) {
        this.voiceprint = voiceprint;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getFaces() {
        return faces;
    }

    public void setFaces(String faces) {
        this.faces = faces;
    }

    public String getSnsid() {
        return snsid;
    }

    public void setSnsid(String snsid) {
        this.snsid = snsid;
    }

    public String getBtcid() {
        return btcid;
    }

    public void setBtcid(String btcid) {
        this.btcid = btcid;
    }

    public String getOtoid() {
        return otoid;
    }

    public void setOtoid(String otoid) {
        this.otoid = otoid;
    }

    public String getWuyeid() {
        return wuyeid;
    }

    public void setWuyeid(String wuyeid) {
        this.wuyeid = wuyeid;
    }

    public String getWuyeurl() {
        return wuyeurl;
    }

    public void setWuyeurl(String wuyeurl) {
        this.wuyeurl = wuyeurl;
    }

    public String getCenterurl() {
        return centerurl;
    }

    public void setCenterurl(String centerurl) {
        this.centerurl = centerurl;
    }

    public String getResturl() {
        return resturl;
    }

    public void setResturl(String resturl) {
        this.resturl = resturl;
    }

    public String getSocketurl() {
        return socketurl;
    }

    public void setSocketurl(String socketurl) {
        this.socketurl = socketurl;
    }

    public String getVillage() {
        return village;
    }

    public void setVillage(String village) {
        this.village = village;
    }

    public String getVillageid() {
        return villageid;
    }

    public void setVillageid(String villageid) {
        this.villageid = villageid;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getAutograph() {
        return autograph;
    }

    public void setAutograph(String autograph) {
        this.autograph = autograph;
    }

    public String getHouseNumber() {
        return houseNumber;
    }

    public void setHouseNumber(String houseNumber) {
        this.houseNumber = houseNumber;
    }

    public String getBackground() {
        return background;
    }

    public void setBackground(String background) {
        this.background = background;
    }

    public int getVisible() {
        return visible;
    }

    public void setVisible(int visible) {
        this.visible = visible;
    }

    public List<VillagelistEntity> getVillagelist() {
        return villagelist;
    }

    public void setVillagelist(List<VillagelistEntity> villagelist) {
        this.villagelist = villagelist;
    }

    public static class VillagelistEntity {
        private String logid;
        private String ssoid;
        private String villageid;
        private String wuyeid;
        private String snsid;
        private String btcid;
        private String otoid;
        private String roleid;
        private String village;

        public String getLogid() {
            return logid;
        }

        public void setLogid(String logid) {
            this.logid = logid;
        }

        public String getSsoid() {
            return ssoid;
        }

        public void setSsoid(String ssoid) {
            this.ssoid = ssoid;
        }

        public String getVillageid() {
            return villageid;
        }

        public void setVillageid(String villageid) {
            this.villageid = villageid;
        }

        public String getWuyeid() {
            return wuyeid;
        }

        public void setWuyeid(String wuyeid) {
            this.wuyeid = wuyeid;
        }

        public String getSnsid() {
            return snsid;
        }

        public void setSnsid(String snsid) {
            this.snsid = snsid;
        }

        public String getBtcid() {
            return btcid;
        }

        public void setBtcid(String btcid) {
            this.btcid = btcid;
        }

        public String getOtoid() {
            return otoid;
        }

        public void setOtoid(String otoid) {
            this.otoid = otoid;
        }

        public String getRoleid() {
            return roleid;
        }

        public void setRoleid(String roleid) {
            this.roleid = roleid;
        }

        public String getVillage() {
            return village;
        }

        public void setVillage(String village) {
            this.village = village;
        }
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.uid);
        dest.writeString(this.nickname);
        dest.writeString(this.username);
        dest.writeString(this.qq);
        dest.writeInt(this.sex);
        dest.writeInt(this.age);
        dest.writeString(this.faces);
        dest.writeString(this.snsid);
        dest.writeString(this.btcid);
        dest.writeString(this.otoid);
        dest.writeString(this.wuyeid);
        dest.writeString(this.wuyeurl);
        dest.writeString(this.centerurl);
        dest.writeString(this.resturl);
        dest.writeString(this.socketurl);
        dest.writeString(this.village);
        dest.writeString(this.villageid);
        dest.writeString(this.city);
        dest.writeString(this.autograph);
        dest.writeString(this.houseNumber);
        dest.writeString(this.background);
        dest.writeString(this.birthday);
        dest.writeInt(this.visible);
        dest.writeList(this.villagelist);
    }

    public UserInfo() {
    }

    protected UserInfo(Parcel in) {
        this.uid = in.readString();
        this.nickname = in.readString();
        this.username = in.readString();
        this.qq = in.readString();
        this.sex = in.readInt();
        this.age = in.readInt();
        this.faces = in.readString();
        this.snsid = in.readString();
        this.btcid = in.readString();
        this.otoid = in.readString();
        this.wuyeid = in.readString();
        this.wuyeurl = in.readString();
        this.centerurl = in.readString();
        this.resturl = in.readString();
        this.socketurl = in.readString();
        this.village = in.readString();
        this.villageid = in.readString();
        this.city = in.readString();
        this.autograph = in.readString();
        this.houseNumber = in.readString();
        this.background = in.readString();
        this.birthday = in.readString();
        this.visible = in.readInt();
        this.villagelist = new ArrayList<VillagelistEntity>();
        in.readList(this.villagelist, VillagelistEntity.class.getClassLoader());
    }

    public static final Parcelable.Creator<UserInfo> CREATOR = new Parcelable.Creator<UserInfo>() {
        @Override
        public UserInfo createFromParcel(Parcel source) {
            return new UserInfo(source);
        }

        @Override
        public UserInfo[] newArray(int size) {
            return new UserInfo[size];
        }
    };
}
